﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class TaskNPC : NPC
    {
        private string taskinfo;


        /// <summary>
        /// 属性
        /// </summary>
        public string Taskinfo
        {
            get { return this.taskinfo = Taskinfo; }
            set { this.taskinfo = value; }
        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="name"></param>
        /// <param name="type"></param>
        /// <param name="taskinfo"></param>
        public TaskNPC(string name, NPCType type, string taskinfo) : base(name, type)
        {
            this.taskinfo = taskinfo;
        }

        public override void Speak()
        {
            Console.WriteLine("你能帮帮我吗?NPC:{0},任务:{1}", this.Name, this.taskinfo);
        }
    }
}
